package com.wl.dzt.sys.ui.ext;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author wl_code@163.com
 * @version 1.0
 * @date 2018/7/5/005
 * @description ext工具
 */
public class Ext {

    /**
     * <b>获取ext表格模型</b>

     *
     * @param list
     * @param count
     * @return
     */
    public static Map<String, Object> extGrid(List<?> list, Integer count) {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put("data", list);
        data.put("count", count);
        return data;
    }

    /**
     * <b>获取ext加载模型</b>

     *
     * @param entity
     * @return
     */
    public static Map<String, Object> extLoad(Object entity) {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put("data", entity);
        data.put("success", true);
        return data;
    }

}
